import request from "@/utils/Request";
export default {
	listPlan(data) {
		return request({
			url: "/zx/plan/get",
			method: "post",
			data: data,
		});
	},
	getPlanById(id) {
		return request({
			url: "/zx/plan/get",
			method: "post",
			data: { id: id },
		});
	},
	setLeader(data) {
		return request({
			url: "/zx/plan/setLeader",
			method: "post",
			data: data,
			debounce: 500,
		});
	},
	listTask(data) {
		return request({
			url: "/zx/task/get",
			method: "post",
			data: data,
		});
	},
	getTaskById(id) {
		return request({
			url: "/zx/task/get",
			method: "post",
			data: { id: id },
		});
	},
	assignTask(data) {
		return request({
			url: "/zx/task/assign",
			method: "post",
			data: data,
			debounce: 500,
		});
	},
	getTaskFormById(id) {
		return request({
			url: "/zx/task/getForm",
			method: "post",
			data: { id: id },
		});
	},
	submitTaskForm(data) {
		return request({
			url: "/zx/task/submitForm",
			method: "post",
			data: data,
			debounce: 500,
		});
	},
	leaderApproval(data) {
		return request({
			url: "/zx/task/leaderApproval",
			method: "post",
			data: data,
			debounce: 500,
		});
	},
	foremanApproval(data) {
		return request({
			url: "/zx/plan/foremanApproval",
			method: "post",
			data: data,
			debounce: 500,
		});
	},
	supervisorApproval(data) {
		return request({
			url: "/zx/plan/supervisorApproval",
			method: "post",
			data: data,
			debounce: 500,
		});
	},
	todoApproval(id) {
		return request({
			url: "/sys/todo/approve",
			method: "post",
			data: { id: id },
			debounce: 500,
		});
	},
	leaderApprovalReturn(id) {
		return request({
			url: "/zx/task/leaderApprovalReturn",
			method: "post",
			data: { id: id },
			debounce: 500,
		});
	},
	reassignTask(data) {
		return request({
			url: "/zx/task/reAssign",
			method: "post",
			data: data,
			debounce: 500,
		});
	},
};
